#pragma once
#include "stdafx.h"
#include "JackTokenizer.h"
#include "SymbolTable.h"

using namespace std;

class CompilationEngine
{
private:
	fstream outfile;
	JackTokenizer tokenizerInstance;
	// TBD Added
	SymbolTable CSTab, MSTab; //Class Scope/Method Scope Symbol Table
	int ifCount, whileCount;
	string className;
public:
	CompilationEngine(char *infilename);
	~CompilationEngine(void);
	bool CompileClass();
	bool CompileClassVarDec();
	bool CompileSubroutine();
	bool CompileParameterList();
	bool CompileVarDec();
	bool CompileStatements();
	bool CompileDo();
	bool CompileSubroutineCall();
	bool CompileLet();
	bool CompileWhile();
	bool CompileReturn();
	bool CompileIf();
	bool CompileExpression();
	bool CompileTerm();
};

